local hx__shihuai = fk.CreateSkill{
  name = "hx__shihuai",
  tags = { Skill.Compulsory },
}

hx__shihuai:addEffect("targetmod", {
  bypass_times = function(self, player, skill, scope, card)
    if player:hasSkill(hx__shihuai.name) and card and skill.trueName == "slash_skill" and scope == Player.HistoryPhase then
      return true
    end
  end,
})

hx__shihuai:addEffect(fk.CardUsing, {
  mute = true,
  can_refresh = function(self, event, target, player, data)
    return target == player and player:hasSkill(hx__shihuai.name) and
      data.card.trueName == "slash" and not data.extraUse and
      player:usedCardTimes("slash", Player.HistoryPhase) > 1
  end,
  on_refresh = function(self, event, target, player, data)
    player:broadcastSkillInvoke("hx__shihuai")
    player.room:notifySkillInvoked(player, hx__shihuai.name, "offensive")
  end,
})

return hx__shihuai
